export const datetimeShortcuts = [
    {
        text: '5分钟内',
        value: () => {
            const end = new Date();
            const start = new Date(end.getTime() - 5 * 60 * 1000);
            return [start, end];
        },
    },
    {
        text: '半小时内',
        value: () => {
            const end = new Date();
            const start = new Date(end.getTime() - 1800 * 1000);
            return [start, end];
        },
    },
    {
        text: '1小时内',
        value: () => {
            const end = new Date();
            const start = new Date(end.getTime() - 3600 * 1000);
            return [start, end];
        },
    },
    {
        text: '12小时内',
        value: () => {
            const end = new Date();
            const start = new Date(end.getTime() - 3600 * 1000 * 12);
            return [start, end];
        },
    },
    {
        text: '今天',
        value: () => {
            const end = new Date();
            const start = new Date();
            start.setHours(0);
            start.setMinutes(0);
            start.setSeconds(0);
            start.setMilliseconds(0);
            return [start, end];
        },
    },
    {
        text: '上周',
        value: () => {
            const end = new Date();
            const start = new Date();
            start.setDate(start.getDate() - 7);
            return [start, end];
        },
    },
    {
        text: '上个月',
        value: () => {
            const end = new Date();
            const start = new Date();
            start.setMonth(start.getMonth() - 1);
            return [start, end];
        },
    },
];


